<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link href="__PUBLIC__/assets/css/select2.css" rel="stylesheet">

</block>
<block name="stylecss">
<style type='text/css'>
    table tr td{
        width: 80%;
    }
    table tr th{
        width: 16%;
        text-align: center;
        vertical-align: middle!important;
    }
</style>
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>
    <li>
		<a href="{:U('Cert/index')}">证书列表</a>
	</li>
	<li class="active">修改证书信息</li>
</ul><!-- /.breadcrumb -->

<!-- #section:basics/content.searchbox -->
<div class="nav-search" id="nav-search"></div><!-- /.nav-search -->
</block>
<block name="content">
<form action="__CONTROLLER__/cert_edit" method='post' id='myformedit' enctype="multipart/form-data">
<input type="hidden" name='certificate_id' value="{$cert_arr.certificate_id}">
<input type="hidden" name='action' value="cert_edit_action">
<div class="row" style="margin-bottom:7px">
    <div class="col-xs-12"><span class="label label-success"><i class="ace-icon fa fa-user bigger-120"></i> 证书信息</span></div>
</div>
<table class="table table-striped table-bordered table-hover" >
    <tr>
        <th>证书类型</th>
        <td><?php if ($cert_arr['certificate_type'] == 1): ?><span style="color:green">专业等级证书</span><?php endif ?> 
        <?php if ($cert_arr['certificate_type'] == 2): ?><span style="color:blue">迷笛先生资格证书</span><?php endif ?> </td>
    </tr>
    <tr>
        <th>证书编号</th>
        <td><input type="text" name='certificate_num' class="col-xs-12" value="{$cert_arr.certificate_num}"></td>
    </tr>
    <tr>
        <th>获得者的MIDI ID</th>
        <td><input type="text" name='certificate_user_id' class="col-xs-12" value="{$cert_arr.certificate_user_id}"></td>
    </tr>
    <tr>
        <th>专业</th>
        <td><select name="certificate_major_id" id="">
            <option value="1" <?php if ($cert_arr['certificate_major_id'] == 1): ?>selected<?php endif ?>>电吉他</option>
            <option value="2" <?php if ($cert_arr['certificate_major_id'] == 2): ?>selected<?php endif ?>>爵士鼓</option>
            <option value="3" <?php if ($cert_arr['certificate_major_id'] == 3): ?>selected<?php endif ?>>电贝司</option>
        </select></td>
    </tr>
    <tr>
        <th>等级</th>
        <td><select name="certificate_level" id="">
            <option value="1" <?php if ($cert_arr['certificate_level'] == 1): ?>selected<?php endif ?>>1</option>
            <option value="2" <?php if ($cert_arr['certificate_level'] == 2): ?>selected<?php endif ?>>2</option>
            <option value="3" <?php if ($cert_arr['certificate_level'] == 3): ?>selected<?php endif ?>>3</option>
            <option value="4" <?php if ($cert_arr['certificate_level'] == 4): ?>selected<?php endif ?>>4</option>
            <option value="5" <?php if ($cert_arr['certificate_level'] == 5): ?>selected<?php endif ?>>5</option>
            <option value="6" <?php if ($cert_arr['certificate_level'] == 6): ?>selected<?php endif ?>>6</option>
            <option value="7" <?php if ($cert_arr['certificate_level'] == 7): ?>selected<?php endif ?>>7</option>
            <option value="8" <?php if ($cert_arr['certificate_level'] == 8): ?>selected<?php endif ?>>8</option>
            <option value="9" <?php if ($cert_arr['certificate_level'] == 9): ?>selected<?php endif ?>>9</option>
        </select><span style="color: red;">&nbsp;&nbsp;*注意：如果添加的是迷笛先生资格证，则 1初级 2中级 3高级 4特级</span></td>
    </tr>
    <tr>
        <th>认证日期</th>
        <td><div class="input-group">
            <input class="form-control date-picker" type="text" data-date-format="yyyy-mm-dd" name='certificate_time' value="{$cert_arr.certificate_time}">
            <span class="input-group-addon">
                <i class="fa fa-calendar bigger-110"></i>
            </span>
        </div></td>
    </tr>
    <tr>
        <td colspan="2"><button type="submit" class="btn btn-primary" >提交</button> <span class="btn" onClick="location.href='{:U('Cert/index')}'">返回</span></td>
    </tr>
</table>
</form>
</block>
<block name="scripts">
<script src="__PUBLIC__/assets/js/select2.js"></script>
</block>
<block name="jscript">
<script type="text/javascript">
    $(function(){
        $('#menu_data').addClass('active open');
        $('#menu_cert_list').addClass('active');
    });
</script>
<script type="text/javascript">
    $('.date-picker').datepicker({
        autoclose: true,
        todayHighlight: true
    })
</script>
</block>